 <style type="text/css">
        .loyalty-info{
            padding: 10px !important;
            border: 2px solid rgb(208,37,32);
        }
        .loyalty-info .title{
            padding: 10px 0;
            font-weight: bold;
            font-size: 16px;
        }
        .loyalty{
            padding: 10px;
        }
        .loyalty label{
            vertical-align: 4px;
            width: 120px;
            display: inline-block;
        }
        .loyalty input{

        }
        #verify_status{
            color: green;
            font-size: 16px;
        }
        #mobile_number:disabled{
            background: #ccc
        }
    </style>
<?php
if(!isset($this->data['Customer']['id'])){ ?>
<tr>
    <td class="loyalty-info" colspan="3">
        <div class="title">Fill it if you already have</div>
        <div class="loyalty">
            <label>Customer number</label>
            <?php
                echo $this->Form->input('customer_number', array(
                                    'label'     => false,
                                    'div'       => false,
                                    'class'     => 'inp-form med')
                    );     
            ?>
        </div>
        <div class="loyalty">
            <label>Loyalty card number</label>
            <?php
                echo $this->Form->input('card_number', array(
                                    'label'     => false,
                                    'div'       => false,
                                    'class'     => 'inp-form med')
                    );     
            ?>
        </div>
    </td>
</tr>
<tr>
    <td colspan="3">&nbsp;</td>
</tr>
<?php }
?>
<tr>
    <th valign="top">First name <span class="red">*</span></th>
    <td width="250">
        <?php
            echo $this->Form->input('f_name', array(
                                'label'     => false,
                                'div'       => false,
                                'class'     => 'inp-form med')
                );     
        ?>      
    </td>
    <td></td> 
</tr>
<tr>
    <th valign="top">Last name <span class="red">*</span></th>
    <td>
        <?php
            echo $this->Form->input('l_name', array(
                                'label'     => false,
                                'div'       => false,
                                'class'     => 'inp-form med')
                );     
        ?>      
    </td>
    <td></td> 
</tr>
<tr>
    <th valign="top">Email <span class="red">*</span></th>
    <td>
        <?php
            echo $this->Form->input('email', array(
                                'label'     => false,
                                'div'       => false,
                                'class'     => 'inp-form med')
                );     
        ?>      
    </td>
    <td></td> 
</tr>
<?php
if(!isset($this->data['Customer']['id'])){ ?>
<tr>
    <th valign="top">Password <span class="red">*</span></th>
    <td>
        <?php
            echo $this->Form->input('password', array(
                                'label'     => false,
                                'div'       => false,
                                'value'     =>'',
                                'class'     => 'inp-form med')
                );     
        ?>      
    </td>
    <td></td> 
</tr>
<tr>
    <th valign="top">Confirm Password <span class="red">*</span></th>
    <td>
        <?php
            echo $this->Form->input('confirmPassword', array(
                                'label'     => false,
                                'div'       => false,
                                'type'      =>'password',
                                'class'     => 'inp-form med')
                );     
        ?>      
    </td>
    <td></td> 
</tr>
<?php }
?>
<tr>
    <th valign="top">Mobile <span class="red">*</span></th>
    <td>
        <?php
            $this->request->data['Customer']['is_verify_mobile']=  isset($this->request->data['Customer']['is_verify_mobile'])?$this->request->data['Customer']['is_verify_mobile']:0;
            echo $this->Form->input('mobile', array(
                                'label'     => false,
                                'div'       => false,
                                'disabled'  =>($this->data['Customer']['is_verify_mobile']==0)?false:true,
                                'id'=>"mobile_number",
                                'class'     => 'inp-form med')
                );     
        ?>
    </td>
    <td>
        <a href="#" onclick="return verify_mobile()" id="verify_mobinumber_button" class="button <?php echo ($this->data['Customer']['is_verify_mobile']==1)?"hidden":"" ?>">Verify mobile number</a> <span style="color: rgb(208,37,32)">(required)</span>
        <span id="verify_status"><?php echo ($this->data['Customer']['is_verify_mobile']==1)?"verified":"" ?></span>
    </td> 
</tr>
<tr id="verify_place" height="120" class="hidden">
    <th valign="top">&nbsp;</th>
    <td>
        <p>We have sent a confirm code to your mobile , fill it in here and click verify button</p>
        <p>Change your mobile number <a href="#" onclick="return change_mobile()">here</a></p>
        <br/>
        <?php
            echo $this->Form->input('code',array('name'=>'code',"id"=>"verify_code",'class'=>'inp-form','style'=>'','div'=>false,'label'=>false));
        ?>
    </td>
    <td>
        <?php echo $this->Html->link("Verify","#",array('onclick'=>"return verify_code_send()",'id'=>'verify_button','class'=>'button')); ?> or <?php echo $this->Html->link("Re-Send","#",array('onclick'=>"return send_verify_number()",'class'=>'button')); ?>
    </td>
</tr>
<tr>
    <th valign="top">Birth Day:</th>
    <td>
        <?php
            echo $this->Form->input('birthday', array(
                                'label'     => false,
                                'div'       => false,
                                'minYear'   => '1930',
                                'style'     =>'width:90px',
                                'maxYear'   => date('Y')-16,
                                'class'     => 'chosen med')
                );     
        ?>      
    </td>
    <td></td> 
</tr>
<tr>
    <th valign="top">Are you interested in : </th>
    <td colspan="2" >
        <ul class="interest_list">
            <?php
            if(!isset($interested)){
                $interested = array();
            }
            foreach ($interests as $id=>$value) { ?>
            <li><input type="checkbox" name="data[CustomerInterest][interest_id][]" <?php if(in_array($id, $interested)){ ?> checked="true" <?php } ?> value="<?=$id?>" /> <label><?=$value?></label> </li>
        <?php }     
        ?>
        </ul> 
    </td>
</tr>
<tr>
    <th valign="top">Country <span class="red">*</span></th>
    <td>	
        <script type="text/javascript">
            $(document).ready(function(){
                $("#CustomerCountryId").chosen().change(function(){
                    get_city('<?php echo $sN ?>',$(this).val(),0);
                });
                <?php
                if(isset($this->data[$sN]['country_id'])&&isset($this->data[$sN]['city_id'])&&$this->data[$sN]['country_id']!=0&&$this->data[$sN]['city_id']!=0){ ?>
                        get_city('<?php echo $sN ?>','<?=$this->data[$sN]['country_id']?>', '<?=$this->data[$sN]['city_id']?>');
                <?php }
                ?>
            });
        </script>
    <?php
    echo $this->Form->input('country_id', array(
                        'label'     => false,
                        'div'       => false,
                        'empty'     =>'',
                        'data-placeholder'=>'Select a country',
                        'options'   =>$countries,
                        'class'     => 'chosen med')
        );
    ?>
    </td>
    <td></td>
</tr> 
<tr>
    <th valign="top">City <span class="red">*</span></th>
    <td id="city-update">	
        <?php
        echo $this->Form->input('city_id', array(
                            'label'     => false,
                            'div'       => false,
                            'empty'     =>'',
                            'data-placeholder'=>'Select a city',
                            'type'      =>'select',
                            'class'     => 'chosen med')
            );
        ?>
    </td>
    <td></td>
</tr> 